#pragma once

#include <ClanLib/core.h>

template<class T>
class sp : public CL_SharedPtr<T>
{
public:
	sp(T* ptr) : CL_SharedPtr<T>(ptr) { }
	sp() : CL_SharedPtr<T>() {}
};

template<class Container>
typename Container::value_type average(Container const & c)
{
	return std::accumulate(c.begin(), c.end(), 0) / c.size();
}

double const pi = 3.14159265;
double const half_pi = pi / 2;
double const two_pi = pi * 2;
